<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

namespace APPS\NEWSPAPER\CONTROLLERS\BLOCKS;

use APPS\NEWSPAPER\MODELS\Issue;

class Issues extends \T4\Controller {
    
    public function actionAll() {
        $issues = Issue::findAll('firstdate DESC');
        $this->view->assign('issues', $issues);
        return $this->view->render('blocks/issues/all.html');
    }
	
	public function actionLast() {
		$issue = Issue::findOne(null, 'firstdate DESC');
        $this->view->assign('issue', $issue);
        return $this->view->render('blocks/issues/last.html');
	}
    
}